import { default as request, cloud } from '@/framework/utils/request'

/**
 * 播放视频文件
 */
export function getVideo(fileId) {
  return request({
    url: `${cloud.videofusion}/videoFileInfo/playVideoFile`,
    method: 'get',
    params: {
      fileId
    }
  })
}

/**
 * 根据视频编码查询视频文件id
 */
export function qryFileIdByCode(videoCode) {
  return request({
    url: `${cloud.videofusion}/videoFileInfo/qryFileIdByCode`,
    method: 'get',
    params: {
      videoCode
    }
  })
}

/**
 * 播放地址录制
 */
export function startRecord(params) {
  return request({
    url: `${cloud.videofusion}/play/urlRecord`,
    method: 'get',
    params
  })
}

/**
 * 停止播放/录制
 */
export function stopRecord(id) {
  return request({
    url: `${cloud.videofusion}/play/stop`,
    method: 'get',
    params: {
      id
    }
  })
}

